std::basic_istream::sync

From Cppreference

Jump to: navigation, search
int sync();

Fills the input cache buffer with data from the underlying input device.

Contents

Parameters

(none)

Return value

If the stream is buffered and the function is successful, 0 is returned. If the stream is unbuffered, -1 is returned. In the case of error, ​setstate(badbit) is called and depending on exceptions bitmask, exception is thrown.

Example

See also

flush
synchronizes with the underlying storage device
(public member function of std::basic_ostream)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages